/**
 * Copyright 2007 Igor Chaves Cananéa
 *
 * This file is part of PBSFW
 *
 * PBSFW is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * PBSFW is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include "chisquare.h"
#include "constant.h"
#include "exponential.h"
#include "gamma.h"
#include "lognormal.h"
#include "normal.h"
#include "pareto.h"
#include "paretoii.h"
#include "poisson.h"
#include "uniform.h"
#include "distributionfactory.h"

namespace statistic {
	Distribution &DistributionFactory::chisquare(double degrees,
												 double convertRate) {
		return *(new Chisquare(convertRate, degrees));
	}

	Distribution &DistributionFactory::constant(double value,
												double convertRate) {
		return *(new Constant(convertRate, value));
	}

	Distribution &DistributionFactory::exponential(double interarrival,
												   double convertRate) {
		return *(new Exponential(convertRate, interarrival));
	}

	Distribution &DistributionFactory::gamma(double scale, double shape,
											 double convertRate) {
		return *(new Gamma(convertRate, scale, shape));
	}

	Distribution &DistributionFactory::lognormal(double average, double stdDev,
												 double convertRate) {
		return *(new LogNormal(convertRate, average, stdDev));
	}

	Distribution &DistributionFactory::normal(double average, double stdDev,
											  double convertRate) {
		return *(new Normal(convertRate, average, stdDev));
	}

	Distribution &DistributionFactory::pareto(double scale, double shape,
											  double convertRate) {
		return *(new Pareto(convertRate, scale, shape));
	}

	Distribution &DistributionFactory::paretoII(double scale, double shape,
												double convertRate) {
		return *(new ParetoII(convertRate, scale, shape));
	}

	Distribution &DistributionFactory::poisson(double average,
											   double convertRate) {
		return *(new Poisson(convertRate, average));
	}

	Distribution &DistributionFactory::uniform(double lowerbound,
											   double upperbound,
											   double convertRate) {
		return *(new Uniform(convertRate, lowerbound, upperbound));
	}
};
